package com.ag.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbUserState entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_USER_STATE", schema = "dbo", catalog = "AGDB")
public class TbUserState implements java.io.Serializable {

	// Fields

	private String usId;
	private String usName;
	private String a;
	private String b;
	private String c;
	private Set<TbUser> tbUsers = new HashSet<TbUser>(0);

	// Constructors

	/** default constructor */
	public TbUserState() {
	}

	/** minimal constructor */
	public TbUserState(String usId, String usName) {
		this.usId = usId;
		this.usName = usName;
	}

	/** full constructor */
	public TbUserState(String usId, String usName, String a, String b,
			String c, Set<TbUser> tbUsers) {
		this.usId = usId;
		this.usName = usName;
		this.a = a;
		this.b = b;
		this.c = c;
		this.tbUsers = tbUsers;
	}

	// Property accessors
	@Id
	@Column(name = "US_ID", unique = true, nullable = false, length = 4)
	public String getUsId() {
		return this.usId;
	}

	public void setUsId(String usId) {
		this.usId = usId;
	}

	@Column(name = "US_NAME", nullable = false, length = 50)
	public String getUsName() {
		return this.usName;
	}

	public void setUsName(String usName) {
		this.usName = usName;
	}

	@Column(name = "A", length = 50)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 50)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 50)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbUserState")
	public Set<TbUser> getTbUsers() {
		return this.tbUsers;
	}

	public void setTbUsers(Set<TbUser> tbUsers) {
		this.tbUsers = tbUsers;
	}

}